package d1208.Ljs2.Ljs9;

public class Demo1 {
    public static void main(String[] args) throws Exception{
        Class c = Class.forName("Ljs2.Ljs9.Student");
        Student student = (Student)c.newInstance();
        c.getDeclaredField("name").set(student,"小虎");
        c.getDeclaredField("age").set(student,25);
        System.out.println(c.getDeclaredField("name").get(student));
        System.out.println(c.getDeclaredField("age").get(student));
    }
}
